module.exports = {
  async changePageType(ctx, next) {
    ['page_size', 'page_num'].forEach((key) => {
      ctx.query[key] && (ctx.query[key] = +ctx.query[key]);
    });

    await next();
  },
};
